import { createRouter, createWebHashHistory } from 'vue-router';
// import Home from '../views/home.vue';

const routes = [
  {
    path: '/',
    name: 'Home',
    redirect: '/psn-info'
    // component: Home
  },
  {
    path: '/note-mng',
    name: 'noteMng',
    meta: {
      menu: 'noteMng'
    },
    component: () => import('@/views/note-mng/index.vue')
  },
  {
    path: '/note-add',
    name: 'noteAdd',
    meta: {
      menu: 'noteMng'
    },
    component: () => import('@/views/note-mng/note-add.vue')
  },
  {
    path: '/note-edit',
    name: 'noteEdit',
    meta: {
      menu: 'noteMng'
    },
    component: () => import('@/views/note-mng/note-add.vue')
  },
  {
    path: '/doc-mng',
    name: 'docMng',
    meta: {
      menu: 'docMng'
    },
    component: () => import('@/views/doc-mng/index.vue')
  },
  {
    path: '/doc-add',
    name: 'docAdd',
    meta: {
      menu: 'docMng'
    },
    component: () => import('@/views/doc-mng/doc-add.vue')
  },
  {
    path: '/note-doc',
    name: 'docEdit',
    meta: {
      menu: 'docMng'
    },
    component: () => import('@/views/doc-mng/doc-add.vue')
  },
  {
    path: '/user-mng',
    name: 'userMng',
    meta: {
      menu: 'userMng'
    },
    component: () => import('@/views/user-mng/index.vue')
  },
  {
    path: '/user-add',
    name: 'userAdd',
    meta: {
      menu: 'userMng'
    },
    component: () => import('@/views/user-mng/user-add.vue')
  },
  {
    path: '/user-edit',
    name: 'userEdit',
    meta: {
      menu: 'userMng'
    },
    component: () => import('@/views/user-mng/user-add.vue')
  },
  {
    path: '/psn-info',
    name: 'psnInfo',
    meta: {
      menu: 'psnInfo'
    },
    component: () => import('@/views/psnInfo.vue')
  }
  // {
  //   path: "/about",
  //   name: "about",
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () =>
  //     import(/* webpackChunkName: "about" */ "../views/about.vue")
  // }
];

const router = createRouter({
  history: createWebHashHistory(),
  routes
});

export default router;
